package cn.sytton.taffecloud.common.db.mybatis;

/**
 * 验证参数，如同分页参数Page
 *
 * @author skyrock
 */
public class ValidatorParamsHelp{
    private static final ThreadLocal<ValidatorParams> LOCAL_PARAMS = new ThreadLocal<ValidatorParams>();


    /**
     * 设置 ValidatorParams 参数
     */
    public static void setLocalParams(ValidatorParams params) {
        LOCAL_PARAMS.set(params);
    }

    /**
     * 获取 Params 参数
     */
    public static ValidatorParams getLocalParams() {
        return LOCAL_PARAMS.get();
    }

    /**
     * 移除本地变量
     */
    public static void clearParams() {
        LOCAL_PARAMS.remove();
    }
}
